﻿<div class="top_bar">
  <div class="wrap" style="z-index: 1001">
    <div class="top_bar_link fr">
      <div class="fl">

      @{
        var user = (V5_Model.ModelGZUser)Session["isLogin"];   
     }
     @if (user == null)
     {
      <span id="login"><a href="/index.aspx?t=login">登录</a></span>
     }
     else
     {
      <span id="logout"><a class="logout" href="/loginOut.aspx">退出</a></span> 
      <span id="logout"><a class="logout" href="/index.aspx?t=user/MyBill">会员中心</a></span> 
     }
      </div>
      <ul class="fl">
        <li><a href="/index.aspx?t=user/FastBill">快捷订单</a></li>
        <li class="jf"><a href="/index.aspx?t=Product/ShoppingCart">我的购物车</a></li> 
        <li class="jf"><a href="/index.aspx?t=ActivityCenter/List" target="_blank">活动中心</a></li>
        <li class="jf"><a href="/index.aspx?t=AboutUs" target="_blank">联系客服</a></li>
        <li class="jf"><a href="/index.aspx?t=ComplaintsRre" target="_blank">我要投诉</a></li>
      </ul>
    </div>
    <a href="javascript:bookmark();">收藏本站</a> </div>
</div>
 <!--顶部可伸缩广告 start -->
    @V5.Html.Partial("includes/headPoster")
    <!--顶部可伸缩广告 end -->
    @V5.Html.Partial("includes/Index_Menu")
    <!--左侧主菜单 -->
    
<div class="nav_bar">
    <div class="wrap" style="z-index: 1000">
        <div id="allSortOuterbox">
            <h2 class="all_sort_link fl">
                <a class="fl" href="#">所有商品分类</a></h2>
            <div id="allCategoryHeader" class="allsort_out_box" style="display:none">
                @V5.Html.Partial("includes/Index-Class-List")
            </div>
        </div>
        <!--搜索区 -->
        <div class="search_box fl">
            <input style="color: rgb(153, 153, 153);" name="keyword" class="fl" id="keyword"
                value="请输入搜索关键字" data-def="请输入搜索关键字" maxlength="100" type="text" onclick="emptySearchBar()">
            <button style="margin-left: 5px" onclick="SearchProd($('#keyword').val())">
                搜索</button>
            @{
                DataTable dt = new V5_EShop._Class.BLL.BLLGZBrand().GetList(5,""," oid desc").Tables[0];
                
                if(dt!=null&&dt.Rows.Count>0)
                {
                     <span id="hotKeywordsShow" style="padding-left:5px">

                        @foreach (DataRow dr in dt.Rows)
                        {
                            <a href="@V5.Url.Action("Product/List", new { BrandID = dr["ID"].ToString() })" title="@dr["BrandName"]" target="_blank">@dr["BrandName"]</a>
                        } 
                    </span>
                    
                }
             }
              
           </div>
                    <input type="hidden" id="keyUrl" value="@V5.Url.Action("Product/category", new { ClassID = "", S = "{key}", PageID = "" })" />
        <!--购物车 -->
        <div id="scrollCart" class="index_cart fr">
            <div id="miniCart" class="index_cart_num fl">
            @{
                var ItemList = (List<V5_Model.BuyerItem>)Session["BuyerItemList"];

                int BuyItemCount = 0;

                if (ItemList != null && ItemList.Count > 0)
                {
                    BuyItemCount = ItemList.Count();
                }
                
                
                }


                <span><a href="/index.aspx?t=Product/ShoppingCart" onclick="">购物车：<strong id="in_cart_num">@BuyItemCount</strong>件</a></span>
                <div id="showMiniCart" class="show_cart" style="display: none;">
                </div>
                <iframe id="DivShim" style="position: absolute; display: none;" frameborder="0" scrolling="no">
                </iframe>
            </div>
        </div>
    </div>
</div>

    <script>

        $(function () {

            if (menuHide) {
                $("#allCategoryHeader").show();
            }
            menuInit(!menuHide);
            leftMenuHover();
        });
        var SearchProd = function (key) {
            if ($.trim(key) == "" || $.trim(key) == $("#keyword").attr("data-def")) {
                return;
            }
            window.location.href = $("#keyUrl").val().replace("{key}",key);
        }
    </script>